<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改二手房</title>
    <link rel="stylesheet" href="/admin/layui/css/layui.css" media="all">
    <script src="/admin/layui/layui.js"></script>
</head>
<body>

<label style="padding-left:100px;line-height:100px;padding-bottom:60px;">修改二手房类型</label>
<form class="layui-form" action="/admin/add_house_xiuer" enctype="multipart/form-data" method="post">
    @csrf
    <div class="layui-form-item">
        <label class="layui-form-label">图片:</label>
        <div class="layui-input-inline">
            <input type="file" name="zh_picture" required lay-verify="required" placeholder="请输入二手房图片" autocomplete="off" class="layui-input" value="{{$rows -> zh_picture}}">
    </div>
        <div class="layui-form-mid layui-word-aux">二手房图片(确保准确无误)</div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">商圈名:</label>
        <div class="layui-input-inline">
            <input type="text" name="zh_name" required lay-verify="required" placeholder="请输入二手房商圈名" autocomplete="off" class="layui-input" value="{{$rows -> zh_name}}">
    </div>
        <div class="layui-form-mid layui-word-aux">二手房商圈名(确保准确无误)</div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">户型:</label>
        <div class="layui-input-inline">
            <input type="number" name="zh_square" required lay-verify="required" placeholder="请输入二手房户型" autocomplete="off" class="layui-input" value="{{$rows -> zh_square}}">
    </div>
        <div class="layui-form-mid layui-word-aux">二手房户型(确保准确无误)</div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">地区:</label>
        <div class="layui-input-inline">
            <input type="text" name="zh_place" required lay-verify="required" placeholder="请输入二手房地区" autocomplete="off" class="layui-input" value="{{$rows -> zh_place}}">
    </div>
        <div class="layui-form-mid layui-word-aux">二手房地区(确保准确无误)</div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">房子户型:</label>
        <div class="layui-input-inline">
            
            <select name="zh_house_class" lay-verify="required">
                <option value="{{$house_class -> rid}}">{{$house_class -> house_type}}</option>
                <?php foreach($post as $p){?>
                <option value="{{$p -> rid}}">{{$p -> house_type}}</option>
                <?php }?>
            </select>
    </div>
        <div class="layui-form-mid layui-word-aux">二手房房子户型(确保准确无误)</div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">房价:</label>
        <div class="layui-input-inline">
            <input type="number" name="zh_price" required lay-verify="required" placeholder="请输入二手房房价" autocomplete="off" class="layui-input" value="{{$rows -> zh_price}}">
    </div>
        <div class="layui-form-mid layui-word-aux">二手房房价(确保准确无误)</div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">面积:</label>
        <div class="layui-input-inline">
            <input type="number" name="acreage" required lay-verify="required" placeholder="请输入二手房面积" autocomplete="off" class="layui-input" value="{{$rows -> acreage}}">
    </div>
        <div class="layui-form-mid layui-word-aux">二手房面积(确保准确无误)</div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">首付百分比:</label>
        <div class="layui-input-inline">
            
            <select name="down_payment" lay-verify="required">
                <option value="{{$rows -> percentage}}">{{$rows -> percentage}}%</option>
                <option value="30">30%</option>
                <option value="40">40%</option>
                <option value="50">50%</option>
                <option value="60">60%</option>
                <option value="70">70%</option>
                <option value="80">80%</option>
                <option value="90">90%</option>
            </select>
    </div>
        <div class="layui-form-mid layui-word-aux">二手房首付(确保准确无误)</div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">月供年份:</label>
        <div class="layui-input-inline">
            <input type="number" name="installment" required lay-verify="required" placeholder="请输入二手房月供" autocomplete="off" class="layui-input" value="{{$rows -> installment}}">
    </div>
        <div class="layui-form-mid layui-word-aux">二手房月供(确保准确无误)</div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">楼层:</label>
        <div class="layui-input-inline">
            <input type="number" name="floor" required lay-verify="required" placeholder="请输入二手房楼层" autocomplete="off" class="layui-input" value="{{$rows -> floor}}">
    </div>
        <div class="layui-form-mid layui-word-aux">二手房楼层(确保准确无误)</div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">装修:</label>
        <div class="layui-input-inline">
            <input type="name" name="fitment_finish" required lay-verify="required" placeholder="请输入二手房装修" autocomplete="off" class="layui-input" value="{{$rows -> fitment_finish}}">
    </div>
        <div class="layui-form-mid layui-word-aux">二手房装修(确保准确无误)</div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">经纪人房评:</label>
        <div class="layui-input-inline">
            <input type="name" name="Room_evaluation" required lay-verify="required" placeholder="请输入二手房经纪人房评" autocomplete="off" class="layui-input" value="{{$rows -> Room_evaluation}}">
    </div>
        <div class="layui-form-mid layui-word-aux">二手房经纪人房评(确保准确无误)</div>
    </div>
    <input type="hidden" name="id" value="{{$rows -> id}}"/>

    <div class="layui-form-item">
        <div class="layui-input-block">

            <input class="layui-btn" type="submit" value="修改"/>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });
</script>
</body>
</html>
